<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    div {
      border: 1px solid black;
      width: 100px;
      height: 100px;
      position: absolute;
    }

    .box1 {
      background-color: lightskyblue;
      position: absolute;
      z-index: 2;
    }

    .box2 {
      background-color: lawngreen;
      position: absolute;
      left: 50px;
      top: 50px;
      z-index: 3;
    }
  </style>
</head>

<body>
  <div class="box1">1</div>
  <div class="box2">2</div>
</body>

</html>